#ifndef DW_GRAPHICS_INDEX_BUFFER_H
#	define DW_GRAPHICS_INDEX_BUFFER_H

#include "graphics/opengl/bufferobject.h"

namespace dw {
	namespace graphics {

class IndexBuffer
:	public details::BufferObject
{
private :
	typedef BufferObject super;

public :
	enum indextypes { uint8 = 0, uint16, uint32, indextypes_count };

public :
	indextypes getIndexType() const ;

private :
	friend class Renderer;

	IndexBuffer(updates update, usages usage, indextypes indexType);
	IndexBuffer(GLuint id, updates update, usages usage, indextypes indexType);
	~IndexBuffer();

private :
	static GLsizei glIndexSize(indextypes indexType);
	static GLenum glType(indextypes indexType);

private :
	indextypes m_indexType;
};

	} // namespace graphics
} // namespace dw

#include "graphics/indexbuffer.inl"

#endif // !DW_GRAPHICS_INDEX_BUFFER_H
